<template>
  <!-- 单元格
      van-cell
          title:左边标题
          value:右边文本
          icon:"左边icon"
          is-link:右边小剪头
          center:上下居中 true
          slot="icon/title/default/right-icon" 
          只有default插槽可以省掉template,其它的都不可以
    -->
  <van-cell is-link center class="myCell">
    <template #icon>
      <!-- iconfont如果是动态字段(变量)需要使用v-html来解析 -->
      <i class="iconfont r12" v-html="icon"></i>
    </template>
    <template #title>
      <div class="title">
        {{ title }}
      </div>
    </template>
    <template #default>
      <div class="value">
        {{ value }}
      </div>
    </template>
  </van-cell>
</template>
<script>
export default {
  props: ['title', 'value', 'icon']
}
</script>
<style lang="less" scoped>
.myCell {
  .r12 {
    padding-right: 12px;
  }
  .title {
    font-size: 14px;
    font-family: PingFangSC, PingFangSC-Regular;
    font-weight: 500;
    text-align: left;
    color: #181a39;
    line-height: 20px;
    letter-spacing: 0px;
  }
  .value {
    font-size: 14px;
    font-family: PingFangSC, PingFangSC-Regular;
    font-weight: 400;
    text-align: right;
    color: #5b5d75;
    line-height: 20px;
    letter-spacing: 0px;
  }
}
</style>
